<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="box"></div>
</body>
<style>
    #box{
        width: 400px;
        height: 400px;
        line-height: 400px;
        border: 1px solid black;
        background-color: red;
        text-align: center;
    }
    #box::after{
        content: "hello";
        background-color: #fff;
        display: inline-block;
        vertical-align: middle;
        /* 不继承 */
        line-height: normal;
    }
</style>
</html>